package com.mansoor.app.islamicnameslite.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

/**
 * Created by IntelliJ IDEA.
 * User: TKMAQ61
 * Date: Nov 17, 2009
 * Time: 9:33:53 AM
 */
public class FindName extends Activity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.find);

        final EditText name_field = (EditText) findViewById(R.id.name_textbox);
        findViewById(R.id.submit);
        final Button submit = (Button) findViewById(R.id.submit);
        findViewById(R.id.submit);

        submit.setOnClickListener(new View.OnClickListener()
        {
            public void onClick(View view)
            {

                final String name = name_field.getText().toString();

                if (name!=null && name.length()>0)
                {
                   
                    Log.i("name", name);

                    Intent intent = new Intent(view.getContext(), NameDetail.class);
                    intent.putExtra("name",name);
                    startActivity(intent);
                }
            }
        });
    }

    
}
